<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>registry (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
       <span class="fn">ui.registry</span>
</div>

<hr/>


  <h2>Classes</h2>
   
<br/>

  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>




  <h2>Global Functions</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.ui.registry.getDecorator"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.ui.registry.</span><span class="entryName">getDecorator<span class="args">(<span class="arg">element</span>)</span>
        </span>
        &#8658; <span>?</span><span class="type"><a href="class_goog_ui_Component.html">goog.ui.Component</a></span>
      </div>


     <div class="entryOverview">
       Returns an instance of <code> goog.ui.Component</code> or a subclass suitable to
decorate the given element, based on its CSS class.

TODO(nnaze): Type of element should be {!Element}.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">element</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/DOM/Element">Element</a></span>
        <div class="entryOverview">Element to decorate.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>?</span><span class="type"><a href="class_goog_ui_Component.html">goog.ui.Component</a></span>&nbsp;
            Component to decorate the element (null if
    none).
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_ui_registry.js.source.html#line132">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.ui.registry.getDecoratorByClassName"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.ui.registry.</span><span class="entryName">getDecoratorByClassName<span class="args">(<span class="arg">className</span>)</span>
        </span>
        &#8658; <span>?</span><span class="type"><a href="class_goog_ui_Component.html">goog.ui.Component</a></span>
      </div>


     <div class="entryOverview">
       Returns the <code> goog.ui.Component</code> instance created by the decorator
factory function registered for the given CSS class name, or null if no
decorator factory function was found.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">className</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">CSS class name.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>?</span><span class="type"><a href="class_goog_ui_Component.html">goog.ui.Component</a></span>&nbsp;
            Component instance.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_ui_registry.js.source.html#line93">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.ui.registry.getDefaultRenderer"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.ui.registry.</span><span class="entryName">getDefaultRenderer<span class="args">(<span class="arg">componentCtor</span>)</span>
        </span>
        &#8658; <span>?</span><span class="type"><a href="class_goog_ui_ControlRenderer.html">goog.ui.ControlRenderer</a></span>
      </div>


     <div class="entryOverview">
       Given a <code> goog.ui.Component</code> constructor, returns an instance of its
default renderer.  If the default renderer is a singleton, returns the
singleton instance; otherwise returns a new instance of the renderer class.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">componentCtor</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span>
        <div class="entryOverview">Component constructor function (for example
    <code> goog.ui.Button</code>).</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>?</span><span class="type"><a href="class_goog_ui_ControlRenderer.html">goog.ui.ControlRenderer</a></span>&nbsp;
            Renderer instance (for example the
    singleton instance of <code> goog.ui.ButtonRenderer</code>), or null if
    no default renderer was found.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_ui_registry.js.source.html#line36">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.ui.registry.reset"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.ui.registry.</span><span class="entryName">reset<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Resets the global renderer and decorator registry.

     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_ui_registry.js.source.html#line148">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.ui.registry.setDecoratorByClassName"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.ui.registry.</span><span class="entryName">setDecoratorByClassName<span class="args">(<span class="arg">className</span>,&nbsp;<span class="arg">decoratorFn</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Maps a CSS class name to a function that returns a new instance of
<code> goog.ui.Component</code> or a subclass, suitable to decorate an element
that has the specified CSS class.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">className</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">CSS class name.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">decoratorFn</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span>
        <div class="entryOverview">No-argument function that returns a new
    instance of a <code> goog.ui.Component</code> to decorate an element.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_ui_registry.js.source.html#line108">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.ui.registry.setDefaultRenderer"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.ui.registry.</span><span class="entryName">setDefaultRenderer<span class="args">(<span class="arg">componentCtor</span>,&nbsp;<span class="arg">rendererCtor</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Sets the default renderer for the given <code> goog.ui.Component</code>
constructor.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">componentCtor</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span>
        <div class="entryOverview">Component constructor function (for example
    <code> goog.ui.Button</code>).</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">rendererCtor</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span>
        <div class="entryOverview">Renderer constructor function (for example
    <code> goog.ui.ButtonRenderer</code>).</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_ui_registry.js.source.html#line70">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>



  <h2>Global Properties</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.ui.registry.decoratorFunctions_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.ui.registry.</span><span class="entryName">decoratorFunctions_</span>
        : 
     </div>


     <div class="entryOverview">
       Map of CSS class names to registry factory functions.  The keys are
class names.  The values are function objects that return new instances
of <code> goog.ui.registry</code> or one of its subclasses, suitable to
decorate elements marked with the corresponding CSS class.  Used by
containers while decorating their children.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_ui_registry.js.source.html#line172">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.ui.registry.defaultRenderers_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.ui.registry.</span><span class="entryName">defaultRenderers_</span>
        : 
     </div>


     <div class="entryOverview">
       Map of <code> goog.ui.Component</code> constructor unique IDs to the constructors
of their default <code> goog.ui.Renderer</code>s.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_ui_registry.js.source.html#line160">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package ui</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="ui.registry"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
